package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

class zbbt {
   private String b = null;
   private String c = null;
   private String d = null;
   private Workbook e;
   private int f = 55;
   private HashMap g = new HashMap();
   private boolean h;
   private static final com.aspose.cells.b.c.a.za i = new com.aspose.cells.b.c.a.za(new String[]{"ReadCustomDocumentProperties_Type_Null", "dateTime.tz", "float", "boolean", "HideHorizontalScrollBar", "HideVerticalScrollBar", "HideWorkbookTabs", "ActiveSheet", "Calculation", "DoNotCalculateBeforeSave", "SemiAutomaticCalculation", "ManualCalculation", "CenterAcrossSelection", "Fill", "Left", "Right", "Justify", "JustifyDistributed", "Distributed", "Center", "Automatic", "Top", "Bottom", "LeftToRight", "RightToLeft", "DiagonalLeft", "DiagonalRight", "None", "", "Continuous", "Dash", "Dot", "DashDot", "DashDotDot", "SlantDashDot", "Double", "Single", "SingleAccounting", "DoubleAccounting", "ReadFont_VerticalAlign_Null", "Subscript", "Superscript", "Solid", "Gray75", "Gray50", "Gray25", "Gray125", "Gray0625", "HorzStripe", "VertStripe", "ReverseDiagStripe", "DiagStripe", "DiagCross", "ThickDiagCross", "ThinHorzStripe", "ThinVertStripe", "ThinReverseDiagStripe", "ThinDiagStripe", "ThinHorzCross", "ThinDiagCross", "General", "General Number", "General Date", "Long Date", "Medium Date", "Short Date", "Long Time", "Medium Time", "Short Time", "Currency", "Euro Currency", "Fixed", "Standard", "Percent", "Scientific", "Yes/No", "True/False", "On/Off", "String", "Number", "DateTime", "Boolean", "Error", "ShowAlways", "Custom", "TopPercent", "BottomPercent", "Blanks", "NonBlanks", "AutoFilterCondition", "AutoFilterOr", "AutoFilterAnd", "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual", "DoesNotEqual", "Equals", "Date", "Decimal", "List", "TextLength", "Time", "Whole", "AnyValue", "Between", "NotBetween", "Equal", "NotEqual", "Greater", "Less", "GreaterOrEqual", "LessOrEqual", "0", "1", "2", "Stop", "Info", "Warn", "U", "I", "B", "S", "Sub", "Sup", "Font", "double", "single-accounting", "double-accounting", "Face", "Color", "Size"});

   public void a(com.aspose.cells.b.a.d.zm var1, Workbook var2) throws Exception {
      zcfw var3 = null;

      try {
         this.g = new HashMap();
         long var4 = var1.i();
         Encoding var6 = null;
         com.aspose.cells.b.a.d.zn var7 = new com.aspose.cells.b.a.d.zn(var1);
         char[] var8 = new char[60];
         int var9 = var7.a(var8, 0, var8.length);
         if (var8[0] == '<' && var8[1] == '?') {
            String var10 = new String(var8, 0, var9);
            String var11 = "encoding=\"";
            int var12 = var10.indexOf(var11);
            if (var12 != -1) {
               var12 += var11.length();
               int var13 = var10.indexOf(34, var12);
               String var14 = var10.substring(var12, var12 + (var13 - var12));
               var6 = Encoding.getEncoding(var14);
            }
         }

         var1.b(var4);
         var3 = zasr.b(var1, var6);
         if (this.a(var2, var3)) {
            this.a(var3, var2);
            var1.b(var4);
            var3 = zasr.b(var1, var6);
            this.a(var2, var3);
            this.a(var3);
         }
      } finally {
         if (var3 != null) {
            var3.c();
         }

      }

   }

   private boolean a(Workbook var1, zcfw var2) throws Exception {
      this.e = var1;
      var2.j();
      if (var2.r() != 1) {
         return false;
      } else {
         if (!"Workbook".equals(var2.p())) {
            this.a((String)null, var2.t());
         }

         return true;
      }
   }

   private void a(zcfw var1, Workbook var2) throws Exception {
      var2.getWorksheets().clear();
      if (!var1.n()) {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if (!"Worksheet".equals(var1.p())) {
                  var1.a();
               } else {
                  String var3 = null;
                  if (var1.m()) {
                     while(var1.l()) {
                        if ("Name".equals(var1.p())) {
                           var3 = var1.s();
                        }
                     }
                  }

                  if (var3 == null) {
                     this.a("A worksheet must have a name.", var1.t());
                  }

                  if (var1.n()) {
                     return;
                  }

                  var1.a();
                  Worksheet var4 = var2.getWorksheets().get(var2.getWorksheets().add());
                  var4.b(var3);
               }
            }

            return;
         }
      }
   }

   private void a(zcfw var1) throws Exception {
      if (!var1.n()) {
         var1.d();
         zhu.c();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("DocumentProperties".equals(var1.p())) {
               this.e(var1);
            } else if ("CustomDocumentProperties".equals(var1.p())) {
               this.f(var1);
            } else if ("ExcelWorkbook".equals(var1.p())) {
               this.g(var1);
            } else if ("Styles".equals(var1.p())) {
               this.h(var1);
            } else if ("Names".equals(var1.p())) {
               this.b(var1, this.e);
            } else if ("Worksheet".equals(var1.p())) {
               this.j(var1);
            } else if ("OfficeDocumentSettings".equals(var1.p())) {
               this.b(var1);
            } else {
               var1.a();
            }
         }

      }
   }

   private void b(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() == 1 && "Colors".equals(var1.p())) {
                  this.c(var1);
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void c(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() == 1 && "Color".equals(var1.p())) {
                  this.d(var1);
               } else {
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void d(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         String var2 = null;
         String var3 = null;
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("Index".equals(var1.p())) {
               var2 = var1.i();
            } else if ("RGB".equals(var1.p())) {
               var3 = var1.i();
            } else {
               var1.a();
            }
         }

         var1.h();
         if (var2 != null && var3 != null) {
            try {
               if (var3.charAt(0) == '#') {
                  var3 = var3.substring(1);
               }

               Color var4 = zase.t(var3);
               int var5 = com.aspose.cells.b.a.zo.a(var2);
               this.e.changePalette(var4, var5);
            } catch (Exception var6) {
               ;
            }
         }

      }
   }

   private void b(zcfw var1, Workbook var2) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(true) {
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else if ("NamedRange".equals(var1.p()) && var1.m()) {
                  String var3 = null;
                  String var4 = null;

                  while(var1.l()) {
                     if ("Name".equals(var1.p())) {
                        var3 = var1.s();
                     } else if ("RefersTo".equals(var1.p())) {
                        var4 = zasp.b(var1.s(), -1, -1);
                     }
                  }

                  if (var3 != null && var4 != null) {
                     int var5 = var2.getWorksheets().getNames().a(-1, var3);
                     Name var6 = var2.getWorksheets().getNames().get(var5);
                     var6.setRefersTo(var4);
                  }

                  var1.k();
                  var1.a();
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void e(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();
         boolean var2 = false;

         while(true) {
            label67:
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else {
                  for(int var3 = 0; var3 < zbbx.a.length; ++var3) {
                     if (com.aspose.cells.b.a.zv.b(var1.p(), zbbx.a[var3])) {
                        int var8 = var3 + 1;
                        String var4 = var1.i();
                        BuiltInDocumentPropertyCollection var5 = this.e.getWorksheets().getBuiltInDocumentProperties();

                        try {
                           switch(var3) {
                           case 0:
                              var5.setTitle(var4);
                              continue label67;
                           case 1:
                              var5.setSubject(var4);
                              continue label67;
                           case 2:
                              var5.setAuthor(var4);
                              continue label67;
                           case 3:
                              var5.setKeywords(var4);
                              continue label67;
                           case 4:
                              var5.setComments(var4);
                              continue label67;
                           case 5:
                              var5.setLastSavedBy(var4);
                              continue label67;
                           case 6:
                              var5.setRevisionNumber(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 7:
                              var5.setNameOfApplication(var4);
                              continue label67;
                           case 8:
                              var5.setTotalEditingTime((double)com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 9:
                              var5.setLastPrinted(DateTime.a(var4));
                              continue label67;
                           case 10:
                              var5.setCreatedTime(DateTime.a(var4));
                              continue label67;
                           case 11:
                              var5.setLastSavedTime(DateTime.a(var4));
                              continue label67;
                           case 12:
                              var5.setPages(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 13:
                              var5.setWords(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 14:
                              var5.setCharacters(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 15:
                              var5.setCategory(var4);
                           case 16:
                           case 19:
                           default:
                              continue label67;
                           case 17:
                              var5.setManager(var4);
                              continue label67;
                           case 18:
                              var5.setCompany(var4);
                              continue label67;
                           case 20:
                              var5.setHyperlinkBase(var4);
                              continue label67;
                           case 21:
                              var5.setBytes(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 22:
                              var5.setLines(com.aspose.cells.b.a.zo.a(var4));
                              continue label67;
                           case 23:
                              var5.setParagraphs(com.aspose.cells.b.a.zo.a(var4));
                           }
                        } catch (Exception var7) {
                           ;
                        }
                        break;
                     }

                     if (var3 == zbbx.a.length - 1) {
                        this.a(var1.t(), var1.p());
                     }
                  }
               }
            }

            var1.h();
            return;
         }
      }
   }

   private void f(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.b(true);
         var1.d();

         while(var1.r() != 4) {
            if (var1.r() != 1) {
               var1.a();
            } else {
               CustomDocumentPropertyCollection var2 = this.e.getWorksheets().getCustomDocumentProperties();
               String var3 = null;
               String var4 = null;
               if (var1.m()) {
                  var4 = var1.a("link");
                  var3 = var1.a("dt", this.d);
               }

               if ("string".equals(var3)) {
                  var3 = null;
               }

               int var5 = var1.t();
               String var6 = var1.p();
               String var7 = var1.i();
               DocumentProperty var8 = null;
               if (var4 != null) {
                  var8 = var2.addLinkToContent(var6, var4);
               }

               if (var3 == null) {
                  var3 = "ReadCustomDocumentProperties_Type_Null";
               }

               try {
                  switch(i.a(var3)) {
                  case 0:
                     if (var8 == null) {
                        var2.add(var6, var7);
                     } else {
                        var8.setValue(var7);
                     }
                     break;
                  case 1:
                     if (var8 == null) {
                        var2.add(var6, DateTime.a(var7));
                     } else {
                        var8.setValue(DateTime.a(var7));
                     }
                     break;
                  case 2:
                     if (var8 == null) {
                        var2.add(var6, zase.B(var7));
                     } else {
                        var8.setValue(zase.B(var7));
                     }
                     break;
                  case 3:
                     if (var8 == null) {
                        var2.add(var6, !"0".equals(var7));
                     } else {
                        var8.setValue(!"0".equals(var7));
                     }
                     break;
                  default:
                     this.a("Invalid dt value \"" + var3 + "\"", var1.t());
                  }
               } catch (Exception var10) {
                  this.a("\"" + var7 + "\" is not a valid " + var3, var5);
                  break;
               }
            }
         }

         var1.h();
         var1.b(false);
      }
   }

   private void g(zcfw var1) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();
         boolean var2 = false;

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else {
               String var3 = null;
               switch(i.a(var1.p())) {
               case 4:
                  this.e.getSettings().setHScrollBarVisible(false);
                  var1.a();
                  break;
               case 5:
                  this.e.getSettings().setVScrollBarVisible(false);
                  var1.a();
                  break;
               case 6:
                  this.e.getSettings().setShowTabs(false);
                  var1.a();
                  break;
               case 7:
                  var3 = var1.i();
                  this.e.getWorksheets().setActiveSheetIndex(com.aspose.cells.b.a.zo.a(var3));
                  break;
               case 8:
                  var3 = var1.i();
                  switch(i.a(var3)) {
                  case 10:
                     this.e.getSettings().setCalcMode(1);
                     continue;
                  case 11:
                     this.e.getSettings().setCalcMode(2);
                  default:
                     continue;
                  }
               case 9:
                  var2 = true;
                  var1.a();
                  break;
               default:
                  var1.a();
               }
            }
         }

         if (!var2) {
            ;
         }

         var1.h();
      }
   }

   private void h(zcfw var1) throws Exception {
      if (!var1.n()) {
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("Style".equals(var1.p())) {
               this.i(var1);
            } else {
               this.a(var1.t(), var1.p());
            }
         }

         var1.h();
      }
   }

   private void i(zcfw var1) throws Exception {
      String var2 = var1.a("ID", this.c);
      if (var2 == null) {
         this.a("ID is required for \"Style\" element.", var1.t());
      }

      if (this.g.containsKey(var2)) {
         this.a("Duplicate Style ID \"" + var2 + "\"", var1.t());
      }

      Style var4 = new Style(this.e.getWorksheets());
      if (this.h) {
         var4.a((WorksheetCollection)this.e.getWorksheets(), (int)15);
      }

      String var5 = var1.a("Parent", this.c);
      int var6 = 0;
      if (var5 != null) {
         var6 = (Integer)this.g.get(var5);
         Style var7 = this.e.getWorksheets().f(var6);
         if (var7 == null) {
            this.a("Can not find the specified Parent \"" + var5 + "\"", var1.t());
         }

         var4.copy(var7);
      }

      String var10 = var1.a("Name", this.c);
      var4.a(var10);
      var4.a(var6);
      int var11;
      if (var1.n()) {
         var11 = this.e.getWorksheets().a(var4);
         this.g.put(var2, var11);
         var1.a();
      } else {
         var1.d();
         boolean var8 = false;

         while(true) {
            int var9;
            label101:
            while(var1.r() != 4) {
               var1.j();
               if (var1.r() != 1) {
                  var1.a();
               } else {
                  for(var9 = 0; var9 < zbbx.c.length; ++var9) {
                     if (com.aspose.cells.b.a.zv.b(var1.p(), zbbx.c[var9])) {
                        var11 = var9 + 1;
                        switch(var9) {
                        case 0:
                           this.a(var1, var4);
                           continue label101;
                        case 1:
                           this.b(var1, var4);
                           continue label101;
                        case 2:
                           this.c(var1, var4);
                           continue label101;
                        case 3:
                           this.d(var1, var4);
                           continue label101;
                        case 4:
                           this.e(var1, var4);
                           continue label101;
                        case 5:
                           var2 = var1.a("Protected", this.c);
                           var4.setLocked(!"0".equals(var2) && !"".equals(var2));
                           var2 = var1.a("x:HideFormula");
                           if (var2 != null) {
                              var4.setFormulaHidden(!"0".equals(var2) && !"".equals(var2));
                           }

                           var1.a();
                           continue label101;
                        default:
                           assert false : null;
                           continue label101;
                        }
                     }

                     if (var9 == zbbx.c.length - 1) {
                        this.a(var1.t(), var1.p());
                     }
                  }
               }
            }

            if (var4.getName() != null && "Normal".equals(var4.getName())) {
               this.h = true;
               this.e.getWorksheets().B().a(0, var4);
               var4.a(false);
               Style var12 = new Style(this.e.getWorksheets());
               var12.copy(var4);
               var12.a(true);
               this.e.getWorksheets().b(var12);
               this.g.put(var2, 15);
            } else if ("Default".equals(var2)) {
               this.e.getWorksheets().B().a(15, var4);
               this.g.put(var2, 15);
            } else {
               var9 = this.e.getWorksheets().a(var4);
               this.g.put(var2, var9);
            }

            var1.h();
            return;
         }
      }
   }

   private void a(zcfw var1, Style var2) throws Exception {
      if (var1.m()) {
         String var3 = null;

         try {
            var3 = var1.a("Horizontal", this.c);
            if (var3 != null) {
               switch(i.a(var3)) {
               case 12:
                  var2.setHorizontalAlignment(2);
                  break;
               case 13:
                  var2.setHorizontalAlignment(4);
                  break;
               case 14:
                  var2.setHorizontalAlignment(7);
                  break;
               case 15:
                  var2.setHorizontalAlignment(8);
                  break;
               case 16:
               case 17:
                  var2.setHorizontalAlignment(6);
                  break;
               case 18:
                  var2.setHorizontalAlignment(3);
                  break;
               case 19:
                  var2.setHorizontalAlignment(1);
               case 20:
                  break;
               default:
                  this.a("Invalid attribute value \"" + var3 + "\"", var1.t());
               }
            }

            var3 = var1.a("Vertical", this.c);
            if (var3 != null) {
               switch(i.a(var3)) {
               case 16:
               case 17:
                  var2.setVerticalAlignment(6);
                  break;
               case 18:
                  var2.setVerticalAlignment(3);
                  break;
               case 19:
                  var2.setVerticalAlignment(1);
               case 20:
               default:
                  break;
               case 21:
                  var2.setVerticalAlignment(9);
                  break;
               case 22:
                  var2.setVerticalAlignment(0);
               }
            }

            var3 = var1.a("Rotate", this.c);
            if (var3 != null) {
               var2.setRotationAngle((int)zase.B(var3));
            }

            var3 = var1.a("ReadingOrder", this.c);
            if (var3 != null) {
               switch(i.a(var3)) {
               case 23:
                  var2.setTextDirection(1);
                  break;
               case 24:
                  var2.setTextDirection(2);
               }
            }

            var3 = var1.a("VerticalText", this.c);
            if (var3 != null) {
               var2.setRotationAngle(255);
            }

            var3 = var1.a("ShrinkToFit", this.c);
            if (var3 != null) {
               var2.setShrinkToFit(!"0".equals(var3) && !"".equals(var3));
            }

            var3 = var1.a("WrapText", this.c);
            if (var3 != null) {
               var2.setTextWrapped(!"0".equals(var3) && !"".equals(var3));
            }

            var3 = var1.a("Indent", this.c);
            if (var3 != null) {
               var2.setIndentLevel(com.aspose.cells.b.a.zo.a(var3));
            }
         } catch (Exception var5) {
            this.a("Invalid value \"" + var3 + "\"", var1.t());
         }
      }

      var1.a();
   }

   private void b(zcfw var1, Style var2) throws Exception {
      if (var1.n()) {
         if (var2.h() > 0 && var2.isModified(1)) {
            var2.getBorders().setStyle(0);
         }

         var1.a();
      } else {
         var1.d();
         String var3 = null;

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else {
               try {
                  if ("Border".equals(var1.p())) {
                     byte var4 = 1;
                     var3 = var1.a("Position", this.c);
                     switch(i.a(var3)) {
                     case 14:
                        var4 = 1;
                        break;
                     case 15:
                        var4 = 2;
                        break;
                     case 16:
                     case 17:
                     case 18:
                     case 19:
                     case 20:
                     case 23:
                     case 24:
                     default:
                        this.a("Invalid value \"" + var3 + "\"", var1.t());
                        break;
                     case 21:
                        var4 = 4;
                        break;
                     case 22:
                        var4 = 8;
                        break;
                     case 25:
                        var4 = 16;
                        break;
                     case 26:
                        var4 = 32;
                     }

                     String var5 = "None";
                     double var6 = 1.0D;
                     var3 = var1.a("LineStyle", this.c);
                     if (var3 != null) {
                        var5 = var3;
                     }

                     var3 = var1.a("Weight", this.c);
                     if (var3 != null) {
                        var6 = zase.B(var3);
                     } else {
                        var6 = 0.0D;
                     }

                     byte var8 = 0;
                     switch(i.a(var5)) {
                     case 27:
                        var8 = 0;
                     case 28:
                        break;
                     case 29:
                        if (var6 <= 0.5D) {
                           var8 = 7;
                        } else if (var6 <= 1.0D) {
                           var8 = 1;
                        } else if (var6 <= 2.0D) {
                           var8 = 2;
                        } else {
                           var8 = 5;
                        }
                        break;
                     case 30:
                        if (var6 <= 1.0D) {
                           var8 = 3;
                        } else {
                           var8 = 8;
                        }
                        break;
                     case 31:
                        if (var6 <= 0.8D) {
                           var8 = 7;
                        } else {
                           var8 = 4;
                        }
                        break;
                     case 32:
                        if (var6 <= 1.0D) {
                           var8 = 9;
                        } else {
                           var8 = 10;
                        }
                        break;
                     case 33:
                        if (var6 <= 1.0D) {
                           var8 = 11;
                        } else {
                           var8 = 12;
                        }
                        break;
                     case 34:
                        var8 = 13;
                        break;
                     case 35:
                        var8 = 6;
                        break;
                     default:
                        this.a("Invalid value \"" + var3 + "\"", var1.t());
                     }

                     var2.getBorders().getByBorderType(var4).setLineStyle(var8);
                     var3 = var1.a("Color", this.c);
                     if (var3 != null) {
                        var2.getBorders().getByBorderType(var4).setColor(this.a(com.aspose.cells.b.a.b.zf.a(var3)));
                     }

                     var1.a();
                  } else {
                     this.a(var1.t(), var1.p());
                  }
               } catch (Exception var9) {
                  this.a("Invalid value \"" + var3 + "\"", var1.t());
               }
            }
         }

         var1.h();
      }
   }

   private void c(zcfw var1, Style var2) throws Exception {
      Font var3 = var2.getFont();
      String var4 = null;

      try {
         var4 = var1.a("Bold", this.c);
         var3.setBold(var4 != null && !"0".equals(var4) && !"".equals(var4));
         var4 = var1.a("Color", this.c);
         if (var4 != null && !"".equals(var4) && !"AUTOMATIC".equals(var4.toUpperCase())) {
            var3.setColor(this.a(com.aspose.cells.b.a.b.zf.a(var4)));
         }

         var4 = var1.a("FontName", this.c);
         if (var4 != null) {
            var3.b(var4);
         }

         var4 = var1.a("Italic", this.c);
         var3.setItalic(var4 != null && !"0".equals(var4) && !"".equals(var4));
         var4 = var1.a("Size", this.c);
         if (var4 != null) {
            var3.setDoubleSize(zase.B(var4));
         }

         var4 = var1.a("StrikeThrough", this.c);
         var3.setStrikeout(var4 != null && !"0".equals(var4) && !"".equals(var4));
         var4 = var1.a("Underline", this.c);
         if (var4 != null) {
            byte var5 = 0;
            switch(i.a(var4)) {
            case 27:
               var5 = 0;
               break;
            case 28:
            case 29:
            case 30:
            case 31:
            case 32:
            case 33:
            case 34:
            default:
               this.a("Invalid value \"" + var4 + "\"", var1.t());
               break;
            case 35:
               var5 = 2;
               break;
            case 36:
               var5 = 1;
               break;
            case 37:
               var5 = 3;
               break;
            case 38:
               var5 = 4;
            }

            var3.setUnderline(var5);
         }

         var4 = var1.a("VerticalAlign", this.c);
         if (var4 == null) {
            var4 = "ReadFont_VerticalAlign_Null";
         }

         switch(i.a(var4)) {
         case 27:
            var3.setSubscript(false);
            var3.setSuperscript(false);
         case 39:
            break;
         case 40:
            var3.setSubscript(true);
            break;
         case 41:
            var3.setSuperscript(true);
            break;
         default:
            this.a("Invalid value \"" + var4 + "\"", var1.t());
         }
      } catch (Exception var6) {
         this.a("Invalid value \"" + var4 + "\"", var1.t());
      }

      var1.a();
   }

   private void d(zcfw var1, Style var2) throws Exception {
      String var3 = var1.a("Pattern", this.c);
      if (var3 == null) {
         var3 = "None";
      }

      switch(i.a(var3)) {
      case 27:
         var2.setPattern(0);
         break;
      case 28:
      case 29:
      case 30:
      case 31:
      case 32:
      case 33:
      case 34:
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      default:
         this.a("Invalid value \"" + var3 + "\"", var1.t());
         break;
      case 42:
         var2.setPattern(1);
         break;
      case 43:
         var2.setPattern(3);
         break;
      case 44:
         var2.setPattern(2);
         break;
      case 45:
         var2.setPattern(4);
         break;
      case 46:
         var2.setPattern(17);
         break;
      case 47:
         var2.setPattern(18);
         break;
      case 48:
         var2.setPattern(5);
         break;
      case 49:
         var2.setPattern(6);
         break;
      case 50:
         var2.setPattern(7);
         break;
      case 51:
         var2.setPattern(8);
         break;
      case 52:
         var2.setPattern(9);
         break;
      case 53:
         var2.setPattern(10);
         break;
      case 54:
         var2.setPattern(11);
         break;
      case 55:
         var2.setPattern(12);
         break;
      case 56:
         var2.setPattern(13);
         break;
      case 57:
         var2.setPattern(14);
         break;
      case 58:
         var2.setPattern(15);
         break;
      case 59:
         var2.setPattern(16);
      }

      String var4 = var1.a("Color", this.c);
      String var5 = var1.a("PatternColor", this.c);
      if (var2.getPattern() != 1) {
         if (var5 != null && !"".equals(var5) && !"AUTOMATIC".equals(var5.toUpperCase())) {
            var2.setForegroundColor(this.a(com.aspose.cells.b.a.b.zf.a(var5)));
         }

         if (var4 != null && !"".equals(var4) && !"AUTOMATIC".equals(var4.toUpperCase())) {
            var2.setBackgroundColor(this.a(com.aspose.cells.b.a.b.zf.a(var4)));
         }
      } else if (var4 != null && !"".equals(var4) && !"AUTOMATIC".equals(var4.toUpperCase())) {
         var2.setForegroundColor(this.a(com.aspose.cells.b.a.b.zf.a(var4)));
      }

      var1.a();
   }

   private void e(zcfw var1, Style var2) throws Exception {
      String var3 = var1.a("Format", this.c);
      if (var3 == null) {
         var1.a();
         var2.setNumber(0);
      } else {
         switch(i.a(var3)) {
         case 28:
            break;
         case 29:
         case 30:
         case 31:
         case 32:
         case 33:
         case 34:
         case 35:
         case 36:
         case 37:
         case 38:
         case 39:
         case 40:
         case 41:
         case 42:
         case 43:
         case 44:
         case 45:
         case 46:
         case 47:
         case 48:
         case 49:
         case 50:
         case 51:
         case 52:
         case 53:
         case 54:
         case 55:
         case 56:
         case 57:
         case 58:
         case 59:
         default:
            var2.setCustom(var3);
            break;
         case 60:
            var2.setNumber(0);
            break;
         case 61:
            var2.setNumber(1);
            break;
         case 62:
            var2.setCustom(com.aspose.cells.b.a.c.zb.a().c());
            break;
         case 63:
            var2.setCustom(com.aspose.cells.b.a.c.zb.a().d());
            break;
         case 64:
            var2.setNumber(15);
            break;
         case 65:
            var2.setCustom(com.aspose.cells.b.a.c.zb.a().e());
            break;
         case 66:
            var2.setNumber(19);
            break;
         case 67:
            var2.setNumber(18);
            break;
         case 68:
            var2.setNumber(20);
            break;
         case 69:
            var2.setCustom("$#,##0.00_);[Red]($#,##0.00)");
            break;
         case 70:
            var2.setCustom("[$€-2] #,##0.00_);[Red]([$€-2] #,##0.00)");
            break;
         case 71:
            var2.setNumber(2);
            break;
         case 72:
            var2.setNumber(4);
            break;
         case 73:
            var2.setNumber(10);
            break;
         case 74:
            var2.setNumber(11);
            break;
         case 75:
            var2.setCustom("\"Yes\";\"Yes\";\"No\"");
            break;
         case 76:
            var2.setCustom("\"True\";\"True\";\"False\"");
            break;
         case 77:
            var2.setCustom("\"On\";\"On\";\"Off\"");
         }

         var1.a();
      }
   }

   private void j(zcfw var1) throws Exception {
      String var2 = null;
      boolean var3 = false;
      if (var1.m()) {
         while(true) {
            if (!var1.l()) {
               var1.k();
               break;
            }

            if ("Name".equals(var1.p())) {
               var2 = var1.s();
            } else if ("Protected".equals(var1.p())) {
               var3 = !"0".equals(var1.s());
            } else if ("RightToLeft".equals(var1.p())) {
               ;
            }
         }
      }

      if (var2 == null) {
         this.a("A worksheet must have a name.", var1.t());
      }

      Worksheet var4 = this.e.getWorksheets().get(var2);
      if (var3) {
         var4.protect(0);
      } else {
         var4.unprotect();
      }

      if (!var1.n()) {
         zbbs var5 = null;
         var1.d();

         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               var1.a();
            } else if ("Table".equals(var1.p())) {
               this.a(var4, var1);
            } else if ("WorksheetOptions".equals(var1.p())) {
               this.b(var4, var1);
            } else if ("PageBreaks".equals(var1.p())) {
               this.d(var4, var1);
            } else if ("Names".equals(var1.p())) {
               this.f(var4, var1);
            } else if ("AutoFilter".equals(var1.p())) {
               this.e(var4, var1);
            } else if ("DataValidation".equals(var1.p())) {
               this.a(var1, var4);
            } else if ("ConditionalFormatting".equals(var1.p())) {
               if (var1.n()) {
                  var1.a();
               } else {
                  if (var5 == null) {
                     var5 = new zbbs(var4);
                  }

                  var5.a(var1);
               }
            } else {
               var1.a();
            }
         }

         var1.h();
      }
   }

   private void a(Worksheet var1, zcfw var2) throws Exception {
      double var3 = 0.0D;
      com.aspose.cells.b.a.b.za var5 = new com.aspose.cells.b.a.b.za(10, 10);

      try {
         com.aspose.cells.b.a.b.zi var6 = com.aspose.cells.b.a.b.zi.a((com.aspose.cells.b.a.b.zj)var5);

         try {
            var3 = (double)var6.f();
         } finally {
            if (var6 != null) {
               var6.d();
            }

         }
      } finally {
         if (var5 != null) {
            var5.b();
         }

      }

      double var43 = 72.0D / var3;
      zbbw var8 = new zbbw();
      String var9 = null;
      if (var2.m()) {
         var9 = var2.a("DefaultColumnWidth", this.c);
         if (var9 != null) {
            var8.c = zase.B(var9);
            var8.f = true;
            double var10 = zkp.a(var8.c / var43, var1.c());
            if (var10 == 0.0D) {
               var1.getCells().getColumns().a().setHidden(true);
            } else {
               var1.getCells().getColumns().a(var10);
            }
         }

         var9 = var2.a("DefaultRowHeight", this.c);
         if (var9 != null) {
            var1.getCells().setStandardHeight(var8.d = zase.B(var9));
            var8.e = true;
         }

         var8.g = var2.a("StyleID", this.c);
         if (var8.g != null && !"".equals(var8.g)) {
            Object var44 = this.g.get(var8.g);
            var1.getCells().getColumns().a().c((Integer)var44);
         }

         var9 = var2.a("LeftCell", this.c);
         if (var9 != null) {
            var8.a = com.aspose.cells.b.a.zo.a(var9) - 2;
         }

         var9 = var2.a("TopCell", this.c);
         if (var9 != null) {
            var8.b = com.aspose.cells.b.a.zo.a(var9) - 2;
         }
      }

      if (var2.n()) {
         var2.a();
      } else {
         var2.d();
         int var45 = 0;
         int var11 = 0;
         Cells var12 = var1.getCells();
         var12.a(4096, 4096, 64);
         RowCollection var13 = var12.getRows();
         zr var14 = var12.f();
         Row var15 = null;
         zp var16 = null;
         int var17 = -1;
         zbbj var18 = new zbbj();
         var18.a(0, var1.getCells());
         zbbj var19 = new zbbj();

         while(true) {
            int var48;
            while(var2.r() != 4) {
               var2.j();
               if (var2.r() != 1) {
                  var2.a();
               } else {
                  int var21;
                  Object var22;
                  boolean var46;
                  if ("Column".equals(var2.p())) {
                     ++var45;
                     int var47 = 0;
                     if (var2.m()) {
                        var9 = var2.a("Index", this.c);
                        if (var9 != null) {
                           var45 = com.aspose.cells.b.a.zo.a(var9);
                        }

                        var9 = var2.a("Span", this.c);
                        if (var9 != null) {
                           var47 = com.aspose.cells.b.a.zo.a(var9);
                        }

                        var9 = var2.a("StyleID", this.c);
                        var21 = 15;
                        if (var9 != null) {
                           var22 = this.g.get(var9);
                           if (var22 != null) {
                              var21 = (Integer)var22;
                           }
                        }

                        var46 = var8.f;
                        var9 = var2.a("Width", this.c);
                        double var51 = 0.0D;
                        if (var9 != null) {
                           var46 = true;
                           var51 = zkp.a(zase.B(var9) / var43, var1.c());
                        }

                        var9 = var2.a("Hidden", this.c);
                        boolean var53 = false;
                        if (var9 != null && !"".equals(var9) && !"0".equals(var9)) {
                           var53 = true;
                        }

                        for(int var54 = 0; var54 <= var47; ++var54) {
                           Column var56 = var1.getCells().getColumns().get(var54 + var45 + var8.a);
                           if (var46) {
                              var56.a = var51;
                           }

                           var56.setHidden(var53);
                           var56.c(var21);
                        }

                        var9 = var2.a("AutoFitWidth", this.c);
                        boolean var55 = var9 != null && !"".equals(var9) && !"0".equals(var9) && !var46;
                        if (var55) {
                           zbbv var57 = new zbbv();
                           var57.a = var8.a + var45;
                           var57.b = var47;
                           var57.c = var55;
                           com.aspose.cells.b.a.a.ze.a(var8.i, (Object)var57);
                        }
                     }

                     var45 += var47;
                     var2.a();
                  } else if (!"Row".equals(var2.p())) {
                     this.a(var2.t(), var2.p());
                  } else {
                     ++var11;
                     var19.a(var18);
                     var19.a = var8.b + var11;
                     boolean var20 = true;
                     int var49;
                     if (var2.m()) {
                        var9 = var2.a("Index", this.c);
                        if (var9 != null) {
                           var11 = com.aspose.cells.b.a.zo.a(var9);
                           var19.a = var8.b + var11;
                        }

                        var9 = var2.a("Span", this.c);
                        var21 = 0;
                        if (var9 != null) {
                           var21 = com.aspose.cells.b.a.zo.a(var9);
                        }

                        var9 = var2.a("StyleID", this.c);
                        if (var9 != null) {
                           var22 = this.g.get(var9);
                           if (var22 == null) {
                              this.a("Invalid value \"" + var9 + "\"", var2.t());
                           } else {
                              var19.d = (Integer)var22;
                              var19.d(true);
                              var20 = false;
                           }
                        }

                        var46 = var8.e;
                        var9 = var2.a("Height", this.c);
                        if (var9 != null) {
                           var46 = true;
                           var19.e = (short)((int)(zase.B(var9) * 20.0D + 0.5D));
                           var19.c(false);
                           if (var19.e == 0) {
                              var19.b(true);
                           }

                           var20 = false;
                        }

                        var9 = var2.a("Hidden", this.c);
                        if (var9 != null) {
                           var19.b(true);
                           var20 = false;
                        }

                        if (!var46) {
                           var9 = var2.a("AutoFitHeight", this.c);
                           if (var9 != null && !"".equals(var9)) {
                              if (!"0".equals(var9)) {
                                 zbbv var23 = new zbbv();
                                 var23.a = var8.b + var11;
                                 var23.b = var21;
                                 var23.c = true;
                                 com.aspose.cells.b.a.a.ze.a(var8.h, (Object)var23);
                              } else {
                                 var19.c(false);
                                 var20 = false;
                              }
                           }
                        }

                        if (!var20) {
                           var17 = var14.a(var19.a, var17);
                           if (var17 < 0) {
                              var17 = var14.a(-var17 - 1, var19, 64);
                              var16 = var14.f(var17);
                           } else {
                              var16 = var14.f(var17);
                              var16.b(var19, 13);
                           }

                           if (var21 > 0) {
                              for(var49 = 0; var49 < var21; ++var49) {
                                 ++var11;
                                 ++var19.a;
                                 var17 = var14.a(var19.a, var17);
                                 if (var17 < 0) {
                                    var17 = var14.a(-var17 - 1, var19, 64);
                                    var16 = var14.f(var17);
                                 } else {
                                    var16 = var14.f(var17);
                                    var16.b(var19, 13);
                                 }
                              }
                           }

                           var15 = new Row(var12, var13, var16, false);
                        } else {
                           var11 += var21;
                        }
                     }

                     if (var2.n()) {
                        var2.a();
                     } else {
                        var2.d();
                        var21 = 0;

                        while(true) {
                           while(var2.r() != 4) {
                              var2.j();
                              if (var2.r() != 1) {
                                 var2.a();
                              } else {
                                 ++var21;
                                 if (!"Cell".equals(var2.p())) {
                                    this.a(var2.t(), var2.p());
                                 } else {
                                    var48 = 0;
                                    var49 = 0;
                                    boolean var24 = false;
                                    int var25 = -1;
                                    String var26 = null;
                                    String var27 = null;
                                    String var28 = null;
                                    String var29 = null;

                                    while(var2.l()) {
                                       if ("StyleID".equals(var2.p())) {
                                          var9 = var2.s();
                                          Object var30 = this.g.get(var9);
                                          if (var30 == null) {
                                             this.a("Invalid value \"" + var9 + "\"", var2.t());
                                          }

                                          var25 = (Integer)var30;
                                       } else if ("Index".equals(var2.p())) {
                                          var21 = com.aspose.cells.b.a.zo.a(var2.s());
                                       } else if ("MergeAcross".equals(var2.p())) {
                                          var48 = com.aspose.cells.b.a.zo.a(var2.s());
                                          var24 = true;
                                       } else if ("MergeDown".equals(var2.p())) {
                                          var49 = com.aspose.cells.b.a.zo.a(var2.s());
                                          var24 = true;
                                       } else if ("Formula".equals(var2.p())) {
                                          var26 = var2.s();
                                       } else if ("ArrayRange".equals(var2.p())) {
                                          var29 = var2.s();
                                       } else if ("HRef".equals(var2.p())) {
                                          var27 = var2.s();
                                       } else if ("HRefScreenTip".equals(var2.p())) {
                                          var28 = var2.s();
                                       }
                                    }

                                    if (var20) {
                                       var20 = false;
                                       var17 = var14.a(var19.a, var17);
                                       if (var17 < 0) {
                                          var17 = var14.a(-var17 - 1, var19, 64);
                                          var16 = var14.f(var17);
                                       } else {
                                          var16 = var14.f(var17);
                                          var16.b(var19, 13);
                                       }

                                       var15 = new Row(var12, var13, var16, false);
                                    }

                                    Cell var58 = var15.c(var21 + var8.a);
                                    if (var26 != null) {
                                       String var31 = zasp.b(var26, var58.getRow(), var58.getColumn());
                                       if (var29 != null) {
                                          CellArea var32 = zbbx.a(var29, var58.getRow(), var58.getColumn());
                                          var58.a(var31, var32.EndRow - var32.StartRow + 1, var32.EndColumn - var32.StartColumn + 1);
                                       } else {
                                          var58.setFormula(var31);
                                       }
                                    }

                                    Hyperlink var59 = null;
                                    int var60;
                                    if (var27 != null && !"".equals(var27)) {
                                       if (var27.charAt(0) == '#') {
                                          var27 = var27.substring(1);
                                       }

                                       var60 = var1.getHyperlinks().a(var58.getRow(), var58.getColumn(), 1, 1, var27);
                                       var59 = var1.getHyperlinks().get(var60);
                                       var59.b("");
                                       var59.setScreenTip(var28);
                                    }

                                    if (var25 != -1) {
                                       var58.b(var25);
                                    }

                                    if (var24 && var49 + var48 != 0) {
                                       var1.getCells().merge(var11 + var8.b, var21 + var8.a, var49 + 1, var48 + 1);
                                       var58.a();
                                       if (var25 != -1) {
                                          if (var48 > 0) {
                                             for(var60 = var21 + var8.a + 1; var60 <= var21 + var8.a + var48; ++var60) {
                                                var15.c(var60).b(var25);
                                             }
                                          }

                                          if (var49 > 0) {
                                             for(int var33 = var11 + var8.b + 1; var33 <= var11 + var8.b + var49; ++var33) {
                                                Row var61 = var13.a(var33, false, true, false);

                                                for(int var34 = var21 + var8.a; var34 <= var21 + var8.a + var48; ++var34) {
                                                   var61.c(var34).b(var25);
                                                }
                                             }
                                          }

                                          var58.a();
                                       }
                                    }

                                    var2.k();
                                    if (var2.n()) {
                                       var2.a();
                                       var21 += var48;
                                    } else {
                                       var2.d();

                                       while(true) {
                                          while(var2.r() != 4) {
                                             var2.j();
                                             if (var2.r() != 1) {
                                                var2.a();
                                             } else {
                                                Font var35;
                                                Font var36;
                                                ArrayList var65;
                                                if ("Data".equals(var2.p())) {
                                                   String var63 = null;

                                                   while(var2.l()) {
                                                      if ("Type".equals(var2.p())) {
                                                         var63 = var2.s();
                                                      }
                                                   }

                                                   var2.k();
                                                   if (var63 == null) {
                                                      var63 = "String";
                                                   }

                                                   boolean var64 = false;
                                                   var9 = null;
                                                   if (!var2.n()) {
                                                      if (!"String".equals(var63)) {
                                                         var9 = var2.i();
                                                      } else {
                                                         var2.c(true);
                                                         var2.p = true;
                                                         if ("http://www.w3.org/TR/REC-html40".equals(var2.a("xmlns"))) {
                                                            var65 = new ArrayList();
                                                            var35 = var58.p().q();
                                                            var36 = new Font(var1.c(), (Object)null, false);
                                                            var36.c(var35);
                                                            this.a(var2, var65, var35, var36, var1.c(), false);
                                                            var64 = true;
                                                            this.a(var58, var65, var1.c());
                                                         } else {
                                                            StringBuilder var66 = new StringBuilder();
                                                            this.a(var2, var66, false);
                                                            var9 = com.aspose.cells.b.a.zr.a(var66);
                                                         }

                                                         var2.c(false);
                                                         var2.p = true;
                                                         if (var2.r() == 3) {
                                                            var2.a();
                                                         }
                                                      }
                                                   } else {
                                                      var2.a();
                                                   }

                                                   if (!var64) {
                                                      Object var67 = null;
                                                      switch(i.a(var63)) {
                                                      case 78:
                                                         if (var9 == null) {
                                                            var67 = "";
                                                         } else {
                                                            var67 = var9;
                                                         }
                                                         break;
                                                      case 79:
                                                         if (var9 != null && !"".equals(var9)) {
                                                            var67 = zase.B(var9);
                                                         } else {
                                                            var67 = 0.0D;
                                                         }
                                                         break;
                                                      case 80:
                                                         if (var9 != null && !"".equals(var9)) {
                                                            var67 = DateTime.a(var9);
                                                         } else {
                                                            var67 = 0.0D;
                                                         }
                                                         break;
                                                      case 81:
                                                         if (var9 != null && !"".equals(var9)) {
                                                            var67 = !"0".equals(var9);
                                                         } else {
                                                            var67 = false;
                                                         }
                                                         break;
                                                      case 82:
                                                         var67 = var9;
                                                      }

                                                      if (var58.f()) {
                                                         ((zyi)var58.c.d).a(var58, var67);
                                                      } else {
                                                         var58.putValue(var67);
                                                      }

                                                      if (var59 != null) {
                                                         var59.b(com.aspose.cells.b.a.zr.a(var67));
                                                      }
                                                   }
                                                } else if (!"Comment".equals(var2.p())) {
                                                   if ("NamedCell".equals(var2.p())) {
                                                      var2.a();
                                                   } else {
                                                      var2.a();
                                                   }
                                                } else {
                                                   var60 = var1.getComments().add(var11 + var8.b, var21 + var8.a);
                                                   Comment var62 = var1.getComments().get(var60);

                                                   while(var2.l()) {
                                                      switch(i.a(var2.p())) {
                                                      case 83:
                                                         var62.setVisible("1".equals(var2.s()));
                                                      }
                                                   }

                                                   var2.k();
                                                   if (var2.n()) {
                                                      var2.a();
                                                   } else {
                                                      var2.d();

                                                      while(var2.r() != 4) {
                                                         var2.j();
                                                         if (var2.r() != 1) {
                                                            var2.a();
                                                         } else if ("Data".equals(var2.p())) {
                                                            var2.p = true;
                                                            var2.c(true);
                                                            var65 = new ArrayList();
                                                            var35 = var62.getFont();
                                                            var36 = new Font(var1.c(), (Object)null, false);
                                                            var36.c(var35);
                                                            this.a(var2, var65, var35, var36, var1.c(), false);
                                                            this.a(var62, var65, var1.c());
                                                            var2.p = false;
                                                            var2.c(false);
                                                            if (var2.r() == 3) {
                                                               var2.a();
                                                            }
                                                         } else {
                                                            var2.a();
                                                         }
                                                      }

                                                      var2.h();
                                                   }
                                                }
                                             }
                                          }

                                          var21 += var48;
                                          var2.h();
                                          break;
                                       }
                                    }
                                 }
                              }
                           }

                           var2.h();
                           if (!var20) {
                              var16.l(0, 0);
                           }
                           break;
                        }
                     }
                  }
               }
            }

            var14.a(-10, 0, 0, 0);
            var12.g();
            Iterator var50 = var8.i.iterator();

            zbbv var52;
            while(var50.hasNext()) {
               var52 = (zbbv)var50.next();

               for(var48 = var52.a; var48 <= var52.a + var52.b; ++var48) {
                  var1.autoFitColumn(var48);
               }
            }

            var50 = var8.h.iterator();

            while(var50.hasNext()) {
               var52 = (zbbv)var50.next();

               for(var48 = var52.a; var48 <= var52.a + var52.b; ++var48) {
                  var1.autoFitRow(var48);
               }
            }

            var2.h();
            return;
         }
      }
   }

   private void b(Worksheet var1, zcfw var2) throws Exception {
      boolean var3 = true;
      boolean var4 = false;
      int var5 = 0;
      int var6 = 0;
      int var7 = -1;
      int var8 = -1;
      int var9 = -1;
      if (var2.n()) {
         var2.a();
      } else {
         var2.d();

         while(var2.r() != 4) {
            var2.j();
            if (var2.r() != 1) {
               var2.a();
            } else if ("DoNotDisplayGridlines".equals(var2.p())) {
               var1.setGridlinesVisible(false);
               var2.a();
            } else if ("PageSetup".equals(var2.p())) {
               this.g(var1, var2);
            } else if ("Print".equals(var2.p())) {
               this.h(var1, var2);
            } else if ("FitToPage".equals(var2.p())) {
               var3 = false;
               var2.a();
            } else if ("DoNotDisplayZeros".equals(var2.p())) {
               var1.setDisplayZeros(false);
               var2.a();
            } else {
               String var10;
               if ("Visible".equals(var2.p())) {
                  var10 = var2.i();
                  if ("SheetHidden".equals(var10)) {
                     var1.a(false, false);
                  } else if ("SheetVeryHidden".equals(var10)) {
                     var1.a(false, true);
                  }
               } else if ("DoNotDisplayHeadings".equals(var2.p())) {
                  var1.setRowColumnHeadersVisible(false);
                  var2.a();
               } else if ("Zoom".equals(var2.p())) {
                  var1.setZoom(com.aspose.cells.b.a.zo.a(var2.i()));
               } else if ("FreezePanes".equals(var2.p())) {
                  var4 = true;
                  var2.a();
               } else if ("SplitHorizontal".equals(var2.p())) {
                  var7 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("TopRowBottomPane".equals(var2.p())) {
                  var5 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("SplitVertical".equals(var2.p())) {
                  var8 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("LeftColumnRightPane".equals(var2.p())) {
                  var6 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("TabColorIndex".equals(var2.p())) {
                  int var11 = com.aspose.cells.b.a.zo.a(var2.i());
                  if (var11 < 64) {
                     var1.e(var11);
                  }
               } else if ("TopRowVisible".equals(var2.p())) {
                  var10 = var2.i();
                  if (var10 != null) {
                     var1.setFirstVisibleRow(com.aspose.cells.b.a.zo.a(var10));
                  }
               } else if ("LeftColumnVisible".equals(var2.p())) {
                  var10 = var2.i();
                  if (var10 != null) {
                     var1.setFirstVisibleColumn(com.aspose.cells.b.a.zo.a(var10));
                  }
               } else if ("ActivePane".equals(var2.p())) {
                  var9 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("Panes".equals(var2.p())) {
                  this.c(var1, var2);
               } else {
                  var2.a();
               }
            }
         }

         var2.h();
         var1.getPageSetup().setPercentScale(var3);
         if (var4) {
            var1.a(true);
         }

         if (var7 != -1 || var8 != -1) {
            PaneCollection var12 = var1.b();
            var12.a(var5);
            var12.b(var6);
            if (var8 != -1) {
               var12.d(var8);
            }

            if (var7 != -1) {
               var12.c(var7);
            }

            if (var9 != -1) {
               var12.a(com.aspose.cells.b.a.ze.a(var9));
            }
         }

      }
   }

   private void c(Worksheet var1, zcfw var2) throws Exception {
      if (var2.n()) {
         var2.a();
      } else {
         zbcj var3 = new zbcj(var1);
         var1.a(var3);
         var2.d();

         while(true) {
            while(var2.r() != 4) {
               var2.j();
               if (var2.r() != 1) {
                  var2.a();
               } else if (!"Pane".equals(var2.p())) {
                  var2.a();
               } else if (var2.n()) {
                  var2.a();
               } else {
                  int var4 = -1;
                  int var5 = -1;
                  int var6 = -1;
                  String var7 = null;
                  var2.d();

                  while(var2.r() != 4) {
                     var2.j();
                     if (var2.r() != 1) {
                        var2.a();
                     } else if ("Number".equals(var2.p())) {
                        var4 = com.aspose.cells.b.a.zo.a(var2.i());
                     } else if ("ActiveRow".equals(var2.p())) {
                        var5 = com.aspose.cells.b.a.zo.a(var2.i());
                     } else if ("ActiveCol".equals(var2.p())) {
                        var6 = com.aspose.cells.b.a.zo.a(var2.i());
                     } else if ("RangeSelection".equals(var2.p())) {
                        var7 = var2.i();
                     } else {
                        var2.a();
                     }
                  }

                  var2.h();
                  if (var4 != -1) {
                     zbci var8 = new zbci(var4);
                     com.aspose.cells.b.a.a.ze.a(var3, (Object)var8);
                     if (var5 != -1) {
                        var8.a(var5);
                     }

                     if (var6 != -1) {
                        var8.b(var6);
                     }

                     var8.c(0);
                     if (var7 != null && !"".equals(var7)) {
                        String[] var13 = com.aspose.cells.b.a.zv.d(var7, ',');

                        for(int var10 = 0; var10 < var13.length; ++var10) {
                           String var11 = var13[var10].trim();
                           if (var11.length() > 0) {
                              CellArea var12 = zbbx.f(var11);
                              com.aspose.cells.b.a.a.ze.a(var8.b(), (Object)var12);
                           }
                        }
                     } else {
                        CellArea var9 = new CellArea();
                        if (var5 != -1) {
                           var9.StartRow = var9.EndRow = var5;
                        }

                        if (var6 != -1) {
                           var9.StartColumn = var9.EndColumn = var6;
                        }

                        com.aspose.cells.b.a.a.ze.a(var8.b(), (Object)var9);
                     }
                  }
               }
            }

            var2.h();
            return;
         }
      }
   }

   private void d(Worksheet var1, zcfw var2) throws Exception {
      var1.getHorizontalPageBreaks().clear();
      var1.getVerticalPageBreaks().clear();
      if (var2.n()) {
         var2.a();
      } else {
         var2.d();

         while(true) {
            while(var2.r() != 4) {
               var2.j();
               if (var2.r() != 1) {
                  var2.a();
               } else {
                  int var3;
                  int var4;
                  int var5;
                  if ("ColBreaks".equals(var2.p())) {
                     if (var2.n()) {
                        var2.a();
                     } else {
                        var2.d();

                        while(true) {
                           while(var2.r() != 4) {
                              var2.j();
                              if (var2.r() != 1) {
                                 var2.a();
                              } else if (!"ColBreak".equals(var2.p())) {
                                 var2.a();
                              } else if (var2.n()) {
                                 var2.a();
                              } else {
                                 var2.d();
                                 var3 = -1;
                                 var4 = -1;
                                 var5 = -1;

                                 while(true) {
                                    while(var2.r() != 4) {
                                       var2.j();
                                       if (var2.r() == 1 && !var2.n()) {
                                          if ("Column".equals(var2.p())) {
                                             var3 = com.aspose.cells.b.a.zo.a(var2.i());
                                          } else if ("RowStart".equals(var2.p())) {
                                             var4 = com.aspose.cells.b.a.zo.a(var2.i());
                                          } else if ("RowEnd".equals(var2.p())) {
                                             var5 = com.aspose.cells.b.a.zo.a(var2.i());
                                          } else {
                                             var2.a();
                                          }
                                       } else {
                                          var2.a();
                                       }
                                    }

                                    if (var3 != -1) {
                                       if (var4 == -1 && var5 == -1) {
                                          var1.getVerticalPageBreaks().add(0, var3);
                                       } else {
                                          if (var4 == -1) {
                                             var4 = 0;
                                          }

                                          if (var5 == -1) {
                                             var5 = 255;
                                          }

                                          var1.getVerticalPageBreaks().add(var4, var5, var3);
                                       }
                                    }

                                    var2.h();
                                    break;
                                 }
                              }
                           }

                           var2.h();
                           break;
                        }
                     }
                  } else if (!"RowBreaks".equals(var2.p())) {
                     var2.a();
                  } else if (var2.n()) {
                     var2.a();
                  } else {
                     var2.d();

                     while(true) {
                        while(var2.r() != 4) {
                           var2.j();
                           if (var2.r() != 1) {
                              var2.a();
                           } else if (!"RowBreak".equals(var2.p())) {
                              var2.a();
                           } else if (var2.n()) {
                              var2.a();
                           } else {
                              var2.d();
                              var3 = -1;
                              var4 = -1;
                              var5 = -1;

                              while(true) {
                                 while(var2.r() != 4) {
                                    var2.j();
                                    if (var2.r() == 1 && !var2.n()) {
                                       if ("Row".equals(var2.p())) {
                                          var3 = com.aspose.cells.b.a.zo.a(var2.i());
                                       } else if ("ColStart".equals(var2.p())) {
                                          var4 = com.aspose.cells.b.a.zo.a(var2.i());
                                       } else if ("ColEnd".equals(var2.p())) {
                                          var5 = com.aspose.cells.b.a.zo.a(var2.i());
                                       } else {
                                          var2.a();
                                       }
                                    } else {
                                       var2.a();
                                    }
                                 }

                                 if (var3 != -1) {
                                    if (var4 == -1 && var5 == -1) {
                                       var1.getHorizontalPageBreaks().add(var3, 0);
                                    } else {
                                       if (var4 == -1) {
                                          var4 = 0;
                                       }

                                       if (var5 == -1) {
                                          var5 = 255;
                                       }

                                       var1.getHorizontalPageBreaks().add(var3, var4, var5);
                                    }
                                 }

                                 var2.h();
                                 break;
                              }
                           }
                        }

                        var2.h();
                        break;
                     }
                  }
               }
            }

            var2.h();
            return;
         }
      }
   }

   private void e(Worksheet var1, zcfw var2) throws Exception {
      if (var1.c().getNames().b("_FilterDatabase", var1.getIndex()) != -1) {
         CellArea var3 = zbbx.f(var2.a("Range", this.b));
         var1.getAutoFilter().setRange(var3.StartRow, var3.StartColumn, var3.EndColumn);
      }

      if (var2.n()) {
         var2.a();
      } else {
         var2.d();
         int var4 = -1;

         while(var2.r() != 4) {
            var2.j();
            if (var2.r() != 1) {
               var2.a();
            } else if ("AutoFilterColumn".equals(var2.p())) {
               var4 = this.a(var2, var1.getAutoFilter(), var4);
            }
         }

         var1.getAutoFilter().d = false;
         var2.h();
      }
   }

   private int a(zcfw var1, AutoFilter var2, int var3) throws Exception {
      int var4 = var3 + 1;
      String var5 = var1.a("Index", this.b);
      if (var5 != null) {
         var4 = zase.C(var5) - 1;
      }

      String var6 = var1.a("Type", this.b);
      if (var6 == null) {
         var1.a();
         return var4;
      } else {
         String var7;
         int var8;
         switch(i.a(var6)) {
         case 21:
            var7 = var1.a("Value", this.b);
            var8 = zase.C(var7);
            var2.filterTop10(var4, true, false, var8);
            var1.a();
            return var4;
         case 22:
            var7 = var1.a("Value", this.b);
            var8 = zase.C(var7);
            var2.filterTop10(var4, false, false, var8);
            var1.a();
            return var4;
         case 84:
            if (var1.n()) {
               var1.a();
               return var4;
            } else {
               var1.d();

               while(true) {
                  while(var1.r() != 4) {
                     var1.j();
                     if (var1.r() != 1) {
                        var1.a();
                     } else {
                        var7 = var1.p();
                        switch(i.a(var7)) {
                        case 89:
                           Object[] var12 = this.k(var1);
                           var2.custom(var4, (Integer)var12[0], var12[1]);
                           break;
                        case 90:
                        case 91:
                           boolean var11 = "AutoFilterAnd".equals(var7);
                           if (!var1.n()) {
                              var1.d();
                              Object[] var9 = null;
                              Object[] var10 = null;

                              while(var1.r() != 4) {
                                 var1.j();
                                 if (var1.r() != 1) {
                                    var1.a();
                                 } else {
                                    switch(i.a(var1.p())) {
                                    case 89:
                                       if (var9 == null) {
                                          var9 = this.k(var1);
                                       } else {
                                          var10 = this.k(var1);
                                       }
                                    }
                                 }
                              }

                              var2.custom(var4, (Integer)var9[0], var9[1], var11, (Integer)var10[0], var10[1]);
                              var1.h();
                           } else {
                              var1.a();
                           }
                        }
                     }
                  }

                  var1.h();
                  return var4;
               }
            }
         case 85:
            var7 = var1.a("Value", this.b);
            var8 = zase.C(var7);
            var2.filterTop10(var4, true, true, var8);
            var1.a();
            return var4;
         case 86:
            var7 = var1.a("Value", this.b);
            var8 = zase.C(var7);
            var2.filterTop10(var4, false, true, var8);
            var1.a();
            return var4;
         case 87:
            var2.matchBlanks(var4);
            var1.a();
            return var4;
         case 88:
            var2.matchNonBlanks(var4);
            var1.a();
            return var4;
         default:
            var1.a();
            return var4;
         }
      }
   }

   private Object[] k(zcfw var1) throws Exception {
      String var2 = var1.a("Operator", this.b);
      String var3 = var1.a("Value", this.b);
      var1.a();
      boolean var4 = true;
      Object[] var5 = new Object[2];
      byte var8;
      switch(i.a(var2)) {
      case 27:
         var8 = 6;
         break;
      case 92:
         var8 = 3;
         break;
      case 93:
         var8 = 5;
         break;
      case 94:
         var8 = 1;
         break;
      case 95:
         var8 = 0;
         break;
      case 96:
         var8 = 4;
         break;
      case 97:
         var8 = 2;
         break;
      default:
         var8 = 2;
      }

      var5[0] = Integer.valueOf(var8);
      if (var3 != null) {
         if (zapb.b(var3)) {
            double var6 = zase.B(var3);
            var5[1] = var6;
         } else {
            var5[1] = var3;
         }
      }

      return var5;
   }

   private void f(Worksheet var1, zcfw var2) throws Exception {
      if (var2.n()) {
         var2.a();
      } else {
         var2.d();

         while(var2.r() != 4) {
            var2.j();
            if (var2.r() != 1) {
               var2.a();
            } else if ("NamedRange".equals(var2.p())) {
               String var3 = var2.a("Name", this.c);
               String var4 = var3;
               String var5 = var2.a("RefersTo", this.c);
               if (var3 != null && var5 != null) {
                  try {
                     int var6 = this.e.getWorksheets().getNames().a(var1.getIndex(), var4);
                     Name var7 = this.e.getWorksheets().getNames().get(var6);
                     var7.f(var4.toUpperCase());
                     var7.setRefersTo(zasp.b(var5, -1, -1));
                  } catch (Exception var8) {
                     ;
                  }
               }

               var2.a();
            }
         }

         var2.h();
      }
   }

   private void g(Worksheet var1, zcfw var2) throws Exception {
      if (var2.n()) {
         var2.a();
      } else {
         var2.d();

         while(true) {
            while(var2.r() != 4) {
               var2.j();
               if (var2.r() != 1) {
                  var2.a();
               } else {
                  String var3;
                  if ("Layout".equals(var2.p())) {
                     var3 = var2.a("Orientation", this.b);
                     if (var3 != null) {
                        if ("Landscape".equals(var3)) {
                           var1.getPageSetup().setOrientation(0);
                        } else {
                           var1.getPageSetup().setOrientation(1);
                        }
                     }

                     var3 = var2.a("CenterHorizontal", this.b);
                     if (var3 != null) {
                        if (!"".equals(var3) && !"0".equals(var3)) {
                           var1.getPageSetup().setCenterHorizontally(true);
                        } else {
                           var1.getPageSetup().setCenterHorizontally(false);
                        }
                     }

                     var3 = var2.a("CenterVertical", this.b);
                     if (var3 != null) {
                        if (!"".equals(var3) && !"0".equals(var3)) {
                           var1.getPageSetup().setCenterVertically(true);
                        } else {
                           var1.getPageSetup().setCenterVertically(false);
                        }
                     }

                     var3 = var2.a("StartPageNumber", this.b);
                     if (var3 != null) {
                        var1.getPageSetup().setFirstPageNumber(com.aspose.cells.b.a.zo.a(var3));
                     }

                     var2.a();
                  } else if ("PageMargins".equals(var2.p())) {
                     var3 = var2.a("Bottom", this.b);
                     if (var3 != null && var3.length() > 0) {
                        var1.getPageSetup().setBottomMargin(zase.B(var3) * 2.54D);
                     }

                     var3 = var2.a("Left", this.b);
                     if (var3 != null && var3.length() > 0) {
                        var1.getPageSetup().setLeftMargin(zase.B(var3) * 2.54D);
                     }

                     var3 = var2.a("Right", this.b);
                     if (var3 != null && var3.length() > 0) {
                        var1.getPageSetup().setRightMargin(zase.B(var3) * 2.54D);
                     }

                     var3 = var2.a("Top", this.b);
                     if (var3 != null && var3.length() > 0) {
                        var1.getPageSetup().setTopMargin(zase.B(var3) * 2.54D);
                     }

                     var2.a();
                  } else {
                     byte var4;
                     int var5;
                     int var6;
                     byte var7;
                     String var8;
                     if ("Header".equals(var2.p())) {
                        var3 = var2.a("Data", this.b);
                        if (var3 != null) {
                           var4 = 1;
                           var5 = 0;

                           for(var6 = 0; var6 < var3.length(); ++var6) {
                              if (var3.charAt(var6) == '&' && var6 + 1 < var3.length()) {
                                 switch(var3.charAt(var6 + 1)) {
                                 case 'C':
                                 case 'c':
                                    var7 = 1;
                                    break;
                                 case 'L':
                                 case 'l':
                                    var7 = 0;
                                    break;
                                 case 'R':
                                 case 'r':
                                    var7 = 2;
                                    break;
                                 default:
                                    continue;
                                 }

                                 if (var6 - var5 > 0) {
                                    var1.getPageSetup().setHeader(var4, var3.substring(var5, var5 + (var6 - var5)));
                                 }

                                 var4 = var7;
                                 var5 = var6 + 2;
                              }
                           }

                           if (var5 < var3.length()) {
                              var1.getPageSetup().setHeader(var4, var3.substring(var5));
                           }
                        }

                        var8 = var2.a("Margin", this.b);
                        if (var8 != null && var8.length() > 0) {
                           var1.getPageSetup().setHeaderMargin(zase.B(var8) * 2.54D);
                        }

                        var2.a();
                     } else if (!"Footer".equals(var2.p())) {
                        var2.a();
                     } else {
                        var3 = var2.a("Data", this.b);
                        if (var3 != null) {
                           var4 = 1;
                           var5 = 0;

                           for(var6 = 0; var6 < var3.length(); ++var6) {
                              if (var3.charAt(var6) == '&' && var6 + 1 < var3.length()) {
                                 switch(var3.charAt(var6 + 1)) {
                                 case 'C':
                                 case 'c':
                                    var7 = 1;
                                    break;
                                 case 'L':
                                 case 'l':
                                    var7 = 0;
                                    break;
                                 case 'R':
                                 case 'r':
                                    var7 = 2;
                                    break;
                                 default:
                                    continue;
                                 }

                                 if (var6 - var5 > 0) {
                                    var1.getPageSetup().setFooter(var4, var3.substring(var5, var5 + (var6 - var5)));
                                 }

                                 var4 = var7;
                                 var5 = var6 + 2;
                              }
                           }

                           if (var5 < var3.length()) {
                              var1.getPageSetup().setFooter(var4, var3.substring(var5));
                           }
                        }

                        var8 = var2.a("Margin", this.b);
                        if (var8 != null && var8.length() > 0) {
                           var1.getPageSetup().setFooterMargin(zase.B(var8) * 2.54D);
                        }

                        var2.a();
                     }
                  }
               }
            }

            var2.h();
            return;
         }
      }
   }

   private void h(Worksheet var1, zcfw var2) throws Exception {
      if (var2.n()) {
         var2.a();
      } else {
         var2.d();
         boolean var3 = false;
         int var4 = -1;

         while(var2.r() != 4) {
            var2.j();
            if (var2.r() != 1) {
               var2.a();
            } else {
               String var5;
               if ("FitWidth".equals(var2.p())) {
                  var5 = var2.i();
                  var1.getPageSetup().setFitToPagesWide(com.aspose.cells.b.a.zo.a(var5));
               } else if ("FitHeight".equals(var2.p())) {
                  var5 = var2.i();
                  var1.getPageSetup().setFitToPagesTall(com.aspose.cells.b.a.zo.a(var5));
               } else if ("LeftToRight".equals(var2.p())) {
                  var1.getPageSetup().setOrder(1);
                  var2.a();
               } else if ("BlackAndWhite".equals(var2.p())) {
                  var1.getPageSetup().setBlackAndWhite(true);
                  var2.a();
               } else if ("DraftQuality".equals(var2.p())) {
                  var1.getPageSetup().setPrintDraft(true);
                  var2.a();
               } else if ("CommentsLayout".equals(var2.p())) {
                  var5 = var2.i();
                  if ("SheetEnd".equals(var5)) {
                     var1.getPageSetup().setPrintComments(2);
                  } else if ("InPlace".equals(var5)) {
                     var1.getPageSetup().setPrintComments(0);
                  } else {
                     var1.getPageSetup().setPrintComments(1);
                  }
               } else if ("PrintErrors".equals(var2.p())) {
                  var5 = var2.i();
                  if ("NA".equals(var5)) {
                     var1.getPageSetup().setPrintErrors(3);
                  } else if ("Dash".equals(var5)) {
                     var1.getPageSetup().setPrintErrors(1);
                  } else if ("Blank".equals(var5)) {
                     var1.getPageSetup().setPrintErrors(0);
                  } else {
                     var1.getPageSetup().setPrintErrors(2);
                  }
               } else if ("Scale".equals(var2.p())) {
                  var1.getPageSetup().setZoom(com.aspose.cells.b.a.zo.a(var2.i()));
               } else if ("ValidPrinterInfo".equals(var2.p())) {
                  var3 = true;
                  var2.a();
               } else if ("PaperSizeIndex".equals(var2.p())) {
                  var4 = com.aspose.cells.b.a.zo.a(var2.i());
               } else if ("HorizontalResolution".equals(var2.p())) {
                  var1.getPageSetup().setPrintQuality(com.aspose.cells.b.a.zo.a(var2.i()));
               } else if ("Gridlines".equals(var2.p())) {
                  var1.getPageSetup().setPrintGridlines(true);
                  var2.a();
               } else if ("RowColHeadings".equals(var2.p())) {
                  var1.getPageSetup().setPrintHeadings(true);
                  var2.a();
               } else {
                  var2.a();
               }
            }
         }

         var2.h();
         if (var3) {
            switch(var4) {
            case -1:
            case 119:
               var1.getPageSetup().setPaperSize(1);
               break;
            default:
               var1.getPageSetup().setPaperSize(var4);
            }
         }

      }
   }

   private void a(zcfw var1, Worksheet var2) throws Exception {
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();
         Validation var4 = var2.getValidations().get(var2.getValidations().add());
         String var5 = null;
         String var6 = null;

         while(true) {
            while(zass.a(var1)) {
               if ("Range".equals(var1.p())) {
                  String var10 = var1.i();
                  ArrayList var8 = new ArrayList();
                  if (var10 != null && var10.length() > 0) {
                     zbbx.a(var10, var8);
                  }

                  for(int var9 = 0; var9 < var8.size(); ++var9) {
                     com.aspose.cells.b.a.a.ze.a(var4.getAreaList(), (Object)((CellArea)var8.get(var9)));
                  }
               } else {
                  String var3;
                  if ("Type".equals(var1.p())) {
                     var3 = var1.i();
                     switch(i.a(var3)) {
                     case 84:
                        var4.setType(7);
                     case 85:
                     case 86:
                     case 87:
                     case 88:
                     case 89:
                     case 90:
                     case 91:
                     case 92:
                     case 93:
                     case 94:
                     case 95:
                     case 96:
                     case 97:
                     default:
                        break;
                     case 98:
                        var4.setType(4);
                        break;
                     case 99:
                        var4.setType(2);
                        break;
                     case 100:
                        var4.setType(3);
                        break;
                     case 101:
                        var4.setType(6);
                        break;
                     case 102:
                        var4.setType(5);
                        break;
                     case 103:
                        var4.setType(1);
                        break;
                     case 104:
                        var4.setType(0);
                     }
                  } else if ("CellRangeList".equals(var1.p())) {
                     var1.a();
                  } else if ("Qualifier".equals(var1.p())) {
                     var3 = var1.i();
                     switch(i.a(var3)) {
                     case 105:
                        var4.setOperator(0);
                        break;
                     case 106:
                        var4.setOperator(7);
                        break;
                     case 107:
                        var4.setOperator(1);
                        break;
                     case 108:
                        var4.setOperator(8);
                        break;
                     case 109:
                        var4.setOperator(2);
                        break;
                     case 110:
                        var4.setOperator(4);
                        break;
                     case 111:
                        var4.setOperator(3);
                        break;
                     case 112:
                        var4.setOperator(5);
                     }
                  } else if ("UseBlank".equals(var1.p())) {
                     var4.setIgnoreBlank(false);
                     var1.a();
                  } else {
                     CellArea var7;
                     if ("Min".equals(var1.p())) {
                        if (var4.getOperator() == 6) {
                           var4.setOperator(0);
                        }

                        var3 = var1.i();
                        if (var4.getAreaList().size() > 0) {
                           var7 = (CellArea)var4.getAreaList().get(0);
                           var5 = "=" + zasp.b(var3, var7.StartRow, var7.StartColumn);
                        } else {
                           var5 = "=" + zasp.b(var3, 0, 0);
                        }
                     } else if ("Max".equals(var1.p())) {
                        if (var4.getOperator() == 6) {
                           var4.setOperator(0);
                        }

                        var3 = var1.i();
                        if (var4.getAreaList().size() > 0) {
                           var7 = (CellArea)var4.getAreaList().get(0);
                           var6 = "=" + zasp.b(var3, var7.StartRow, var7.StartColumn);
                        } else {
                           var6 = "=" + zasp.b(var3, 0, 0);
                        }
                     } else if ("Value".equals(var1.p())) {
                        var3 = var1.i();
                        if (var4.getAreaList().size() > 0) {
                           var7 = (CellArea)var4.getAreaList().get(0);
                           var5 = "=" + zasp.b(var3, var7.StartRow, var7.StartColumn);
                        } else {
                           var5 = "=" + zasp.b(var3, 0, 0);
                        }
                     } else if ("ComboHide".equals(var1.p())) {
                        var4.setInCellDropDown(false);
                        var1.a();
                     } else if ("IMEMode".equals(var1.p())) {
                        var3 = var1.i();
                        switch(i.a(var3)) {
                        case 113:
                           var4.a(0);
                           break;
                        case 114:
                           var4.a(1);
                           break;
                        case 115:
                           var4.a(2);
                        }

                        var1.a();
                     } else if ("InputHide".equals(var1.p())) {
                        var4.setShowInput(false);
                        var1.a();
                     } else if ("InputTitle".equals(var1.p())) {
                        var4.setInputTitle(var1.i());
                     } else if ("InputMessage".equals(var1.p())) {
                        var4.setInputMessage(var1.i());
                     } else if ("ErrorHide".equals(var1.p())) {
                        var4.setShowError(false);
                        var1.a();
                     } else if ("ErrorStyle".equals(var1.p())) {
                        var3 = var1.i();
                        switch(i.a(var3)) {
                        case 116:
                           var4.setAlertStyle(1);
                           break;
                        case 117:
                           var4.setAlertStyle(0);
                           break;
                        case 118:
                           var4.setAlertStyle(2);
                        }
                     } else if ("ErrorMessage".equals(var1.p())) {
                        var4.setErrorMessage(var1.i());
                     } else if ("ErrorTitle".equals(var1.p())) {
                        var4.setErrorTitle(var1.i());
                     } else {
                        var1.a();
                     }
                  }
               }
            }

            var4.a(var5, var6);
            return;
         }
      }
   }

   private Color a(Color var1) {
      if (this.e.isColorInPalette(var1)) {
         return var1;
      } else {
         if (this.f < 0) {
            this.f = 55;
         }

         this.e.changePalette(var1, this.f--);
         return var1;
      }
   }

   private void a(Cell var1, ArrayList var2, WorksheetCollection var3) {
      StringBuilder var4 = new StringBuilder();
      ArrayList var5 = new ArrayList();

      for(int var6 = 0; var6 < var2.size(); ++var6) {
         zbbu var7 = (zbbu)var2.get(var6);
         if (var7.b != null && !"".equals(var7.b)) {
            FontSetting var8 = new FontSetting(var4.length(), var7.b.length(), var3, false);
            var4.append(var7.b);
            var8.a(var7.a);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var8);
         }
      }

      if (var1.f()) {
         var1.a((Object)com.aspose.cells.b.a.zr.a(var4), (byte)0);
      } else {
         var1.a(com.aspose.cells.b.a.zr.a(var4), var5);
      }

   }

   private void a(Comment var1, ArrayList var2, WorksheetCollection var3) {
      StringBuilder var4 = new StringBuilder();
      ArrayList var5 = new ArrayList();

      for(int var6 = 0; var6 < var2.size(); ++var6) {
         zbbu var7 = (zbbu)var2.get(var6);
         if (var7.b != null && !"".equals(var7.b)) {
            FontSetting var8 = new FontSetting(var4.length(), var7.b.length(), var3, false);
            var4.append(var7.b);
            var8.a(var7.a);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var8);
         }
      }

      var1.b().a(com.aspose.cells.b.a.zr.a(var4));
      var1.b().b(var5);
   }

   private void a(zcfw var1, ArrayList var2, Font var3, Font var4, WorksheetCollection var5, boolean var6) throws Exception {
      if (!var6) {
         if (var1.n()) {
            var1.a();
            return;
         }

         var1.d();
      }

      while(true) {
         while(var1.r() != 4) {
            var1.j();
            if (var1.r() != 1) {
               if (var1.r() == 3) {
                  zbbu var8 = new zbbu();
                  var8.b = var1.s();
                  var8.a = new Font(var5, (Object)null, false);
                  var8.a.c(var4);
                  com.aspose.cells.b.a.a.ze.a(var2, (Object)var8);
               }

               var1.a();
            } else {
               switch(i.a(var1.p())) {
               case 119:
                  var4.setUnderline(1);
                  String var7 = var1.a("html:Style");
                  if (var7 != null && var7.length() > 14) {
                     var7 = var7.substring(15);
                     if (var7 != null) {
                        switch(i.a(var7)) {
                        case 126:
                           var4.setUnderline(2);
                           break;
                        case 127:
                           var4.setUnderline(3);
                           break;
                        case 128:
                           var4.setUnderline(4);
                        }
                     }
                  }
                  break;
               case 120:
                  var4.setItalic(true);
                  break;
               case 121:
                  var4.setBold(true);
                  break;
               case 122:
                  var4.setStrikeout(true);
                  break;
               case 123:
                  var4.setSuperscript(true);
                  break;
               case 124:
                  var4.setSuperscript(true);
                  break;
               case 125:
                  if (var1.m()) {
                     while(var1.l()) {
                        switch(i.a(var1.p())) {
                        case 129:
                           var4.b(var1.s());
                           break;
                        case 130:
                           var4.setColor(com.aspose.cells.b.a.b.zf.a(var1.s()));
                           break;
                        case 131:
                           var4.setDoubleSize(zase.B(var1.s()));
                        }
                     }

                     var1.k();
                  }
               }

               this.a(var1, var2, var3, var4, var5, false);
            }
         }

         switch(i.a(var1.p())) {
         case 119:
            var4.setUnderline(0);
            break;
         case 120:
            var4.setItalic(false);
            break;
         case 121:
            var4.setBold(false);
            break;
         case 122:
            var4.setStrikeout(false);
            break;
         case 123:
            var4.setSuperscript(false);
            break;
         case 124:
            var4.setSuperscript(false);
            break;
         case 125:
            var4.b(var3.getName());
            var4.setColor(var3.getColor());
            var4.setSize(var3.getSize());
         }

         var1.h();
         return;
      }
   }

   private void a(zcfw var1, StringBuilder var2, boolean var3) throws Exception {
      if (!var3) {
         if (var1.n()) {
            var1.a();
            return;
         }

         var1.d();
      }

      while(var1.r() != 4) {
         var1.j();
         if (var1.r() != 1) {
            var2.append(var1.s());
            var1.a();
         } else {
            this.a(var1, var2, false);
         }
      }

      var1.h();
   }

   private String a(String var1, int var2) {
      throw new CellsException(6, "Line " + var2 + ": " + var1 + " in the SpreadsheetML file.");
   }

   private void a(int var1, String var2) {
      throw new CellsException(6, "Line " + var1 + ": Invalid tag \"" + var2 + "\" in the SpreadsheetML file.");
   }
}
